home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0195.ZIP / CURSOR.PAS < prev    next >
Pascal/Delphi Source File  |  1984-12-03  |  1KB  |  45 lines

  1. {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
  2. The purchaser of these procedures and functions may include them in COMPILED
  3. programs freely, but may not sell or give away the source text.
  4.  
  5. }
  6. program Cursor;
  7. var
  8.   topLine, bottomLine : byte;
  9.   nonsense            : string[79];
  10.  
  11. {$I regpack.typ}
  12. {$I cursor.lib}
  13. {$I monitor.lib}
  14.  
  15. begin
  16.   CheckColor;
  17.   color := false;
  18.   WRite('Cursor takes ');
  19.   if color then write('7') else write('14');
  20.   write(' lines, from 0 to ');
  21.   if color then writeLn('6.') else writeLn('13.');
  22.   WRiteLn;
  23.   WriteLn('Enter 0 for both to quit.');
  24.   WriteLn('Enter 48 for top line to kill cursor.');
  25.   WriteLn;
  26.   if not color then
  27.      WriteLn('Setting top lower than bottom gives two-part cursor,');
  28.   window(1,10,80,25);
  29.   ClrScr;
  30.   repeat
  31.     Write('Enter top line for cursor: ');
  32.     read(topLine); WriteLn;
  33.     Write('Enter bottom line for cursor: ');
  34.     read(bottomLine); writeLn;
  35.     if topLine + BottomLine > 0 then
  36.       begin
  37.         Cursor_Control(topLine,bottomLine);
  38.         WriteLn('Now type a line with your new cursor.');
  39.         readLn(nonsense);
  40.       end;
  41.   until topLine + BottomLine <= 0;
  42.   if color then Cursor_Control(6,7) else Cursor_Control(12,13);
  43. end.
  44.  
  45.